{
 "cells": [
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Welcome\n",
    "\n",
    "🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉\n",
    "\n",
    "Before starting we need to setup some configuration, to connect your milvus.\n",
    "\n",
    "When using this notebook for milvus, the kernel needs some settings like URL and\n",
    "credentials to the milvus.\n",
    "\n",
    "**If you don't know how to deply a milvus server, try [zilliz cloud](https://cloud.zilliz.com/).**\n",
    "\n",
    "![zilliz cloud](./resources/zilliz.svg)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## First step - Config your milvus server.\n",
    "\n",
    "🧑‍💻🧑‍💻🧑‍💻🧑‍💻\n",
    "\n",
    "Run the following code. If you need to find the value and copy and paste, you can\n",
    "re-run the code and continue from where you left off.\n",
    "\n",
    "Milvus supports two ports, port 19530 and port 9091:\n",
    "\n",
    "* Port 19530 is for gRPC, it may be not same when you use zilliz clound.\n",
    "* Port 9091 is for RESTful API."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [],
   "source": [
    "#!import config/Settings.cs\n",
    "\n",
    "string endPoint = await Settings.AskEndpoint();\n",
    "await Settings.AskPort();\n",
    "\n",
    "await Settings.AskUsername();\n",
    "await Settings.AskPassword();"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "If the code above doesn't show any error, you're good to go and run the other notebooks.\n",
    "\n",
    "## Resetting the configuration\n",
    "\n",
    "If you want to reset the configuration and start again, please uncomment and run the code below.\n",
    "You can also edit the [config/settings.json](config/settings.json) manually if you prefer."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Settings deleted. Run the notebook again to configure your AI backend.\r\n"
     ]
    }
   ],
   "source": [
    "#!import config/Settings.cs\n",
    "\n",
    "// Uncomment this line to reset your settings and delete the file from disk.\n",
    "// Settings.Reset();"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
